<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <link rel="icon" href="/favicon.ico">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.staticfile.org/vue/3.2.36/vue.global.min.js"></script>
    <title>Vite App</title>
    <style>

    </style>
</head>

<body>

    <div id="app" class="demo">
        {{info}}
    </div>

    <script>
        const app = {
            data() {
                return {
                    info:"Ajax测试！！"
                }
            },
            mounted(){
                axios
                .get('https://www.runoob.com/try/ajax/json_dome.json')
                .then(response=>(this.info=response))
                .catch(function(error){//请求失败处理
                 console.log(error)
              })
            }
        }
        Vue.createApp(app).mount('#app')
    </script>
</body>
</html>
